package com.example.controller;

import com.example.common.Result;
import com.example.service.StatsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/stats")
public class StatsController {
    @Resource
    private StatsService statsService;

    @GetMapping
    public Result getStats() {
        return Result.success(statsService.getStats());
    }
}
